package ooday03;

public class AnTest01 {
    public static void main(String[] args) {
        Dog01[] dog = new Dog01[3];
        dog[0] = new  Dog01 ("小黄",1,"黄","5cm");
        dog[1] = new  Dog01 ("小红",2,"红","4cm");
        dog[2] = new  Dog01 ("小灰",3,"灰","3cm");
        System.out.println(dog[0].name);
        dog[2].start();

        Chick[] chick = new Chick[2];
        chick[0] = new Chick("小公鸡",1,"黑",'公');
        chick[1] = new Chick("小母鸡",2,"黑",'母');
        chick[0].age = 3;
        System.out.println(chick[0].age);

        Fish[] fish = new Fish[4];
        fish[0] = new Fish("小红鱼",1,"红");
        fish[1] = new Fish("小黄鱼",1,"黄");
        fish[2] = new Fish("小黑鱼",1,"红");
        fish[3] = new Fish("小灰鱼",1,"红");
        fish[0].eat();


    }

}
